<?php

namespace Home\Controller;

use Common\Controller\CommonController;

/**
 * API础类类
 * Class CommonController
 * @package Api\Controller
 */
class HomeCommonController extends CommonController
{
    /**
     * 验证openid有效性
     *
     * @param $id
     * @return bool|mixed
     */
    protected function checkOpenIdAvailable($id)
    {
        $where = array('weixinlog' => $id);
        $data = M('member')->where($where)->find();
        if ($data) {
            return $data;
        } else {
            return false;
        }
    }

}